package cn.com.qing.mydb.dbhelp.help;

import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Properties;

public class DBConnection {
	public static Connection getConnect(Properties properties) {
		Connection con = null;
		try {
			Class.forName(properties.getProperty("jdbc.Driver"));
			con = DriverManager.getConnection(
					properties.getProperty("jdbc.Url"),
					properties.getProperty("jdbc.User"),
					properties.getProperty("jdbc.Password"));
		} catch (Exception e) {
			e.printStackTrace();
		}
		return con;

	}
}
